home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NASA Climatology Interdisciplinary Data Collection
/
NASA Climatology Interdisciplinary Data Collection - Disc 4.iso
/
software
/
grads
/
lib
/
functions
/
moinc.gf
< prev
next >
Wrap
Text File
|
1994-02-16
|
336b
|
17 lines
function moinc(bt,moinc)
*
* increment a month/year dtg by a month
*
moname='jan feb mar apr may jun jul aug sep oct nov dec'
curyr=substr(bt,4,2)
curmo=substr(bt,1,3)
i=1
while (curmo!=subwrd(moname,i));i=i+1;endwhile
i=i+moinc
if(i>12)
curyr=curyr+1
i=i-12
endif
monew=subwrd(moname,i)%curyr
return(monew)